<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group('api', static function () {
    Route::get('user-list', 'index/user/index');
    Route::post('user-create', 'index/user/create');
    Route::post('user-edit', 'index/user/edit');
    Route::get('user-info', 'index/user/read');

    Route::post('user-login', 'index/login/index');
    Route::post('user-info', 'index/login/getInfo')->middleware('checkToken');

//    地区相关接口
    Route::get('area-list', 'index/area/list');  //获取地区列表

//    标签列表接口
    Route::get('tags-all', 'index/tags/getAll');
    Route::get('tags-list', 'index/tags/list');//标签列表
    Route::post('tags-create', 'index/tags/create');
    Route::get('tags-info', 'index/tags/read');
    Route::post('tags-edit', 'index/tags/edit');
    Route::post('tags-delete', 'index/tags/delete');
    Route::post('tags-batch-delete', 'index/tags/batchDelete');
//    消息管理接口
    Route::get('notice-manage-list', 'index/notice/index');
    Route::get('notice-manage-info', 'index/notice/read');
    Route::post('notice-manage-create', 'index/notice/create');
    Route::post('notice-manage-edit', 'index/notice/edit');
    Route::get('notice-manage-delete', 'index/notice/delete');

//    用户消息接口
    Route::get('notice-unread-count', 'index/NoticeUserLog/getUnreadCount');//未读消息数量
    Route::get('notice-list', 'index/NoticeUserLog/list');//消息列表
    Route::get('notice-info', 'index/NoticeUserLog/info');//消息详情
    Route::post('notice-up-edit', 'index/NoticeUserLog/noticeUpEdit');

//    文件上传接口
    Route::post('upload', 'index/upload/uploadFile');
    Route::get('comment-list', 'index/comment/list');
    Route::post('comment-create', 'index/comment/create')->middleware('checkToken');
    Route::post('comment-edit', 'index/comment/edit');
    Route::post('comment-delete', 'index/comment/delete');
    Route::get('comment-info', 'index/comment/info');
    
    Route::group('website', static function () {
        Route::get('/', 'index/website/index'); //网站配置
        Route::get('footer', 'index/website/getFooterList');//底部导航
        Route::get('articleList', 'index/website/articleList');//文章列表
        Route::get('commentList/[:id]', 'index/website/commentList');
        Route::get('article/[:id]', 'index/website/article');//文章详情
        
    });
    
    Route::group('crawler', static function () {
        Route::get('guzzle', 'index/crawler/guzzle');
    });
	
	Route::group('activity', static function () {
		Route::get('list', 'index/activity/list');
		Route::get('info', 'index/activity/info');
	});

});

